Package | smart.who.int.immunizations-measles |
Type | StructureMap |
Id | Id |
FHIR Version | R4 |
Source | http://smart.who.int/immunizations-measles/https://build.fhir.org/ig/WorldHealthOrganization/smart-example-immz/StructureMap-IMMZCLMToPatient.html |
Url | http://smart.who.int/immunizations-measles/StructureMap/IMMZCLMToPatient |
Version | 0.1.0 |
Status | draft |
Date | 2024-09-21T14:59:40+00:00 |
Name | IMMZCLMToPatient |
Experimental | False |
Authority | who |
Description | Immunization Client Registry - Transform Logical Model to Patient resources |
No resources found
No resources found
Note: links and images are rebased to the (stated) source
Generated Narrative: StructureMap IMMZCLMToPatient
map "http://smart.who.int/immunizations-measles/StructureMap/IMMZCLMToPatient" = "IMMZCLMToPatient" // Immunization Client Registry - Transform Logical Model to Patient resources uses "http://smart.who.int/immunizations-measles/StructureDefinition/IMMZCRegisterClient" alias IMMZC as source uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias Bundle as target uses "http://hl7.org/fhir/StructureDefinition/Patient" alias Patient as target group IMMZCToPatient(source immzc : IMMZC, target patient : Patient) { immzc.uniqueId as id -> patient.identifier as identifier then { id -> identifier.value = id "SetIdentifierValue"; } "SetIdentifier"; immzc -> patient.name as pname then NameToHumanName(immzc, pname) "SetName"; immzc.sex as sex -> patient.gender = translate(sex, 'http://smart.who.int/immunizations-measles/ConceptMap/IMMZCSexToAdministrativeGender', 'code') "SetGender"; immzc.birthDate as birthDate -> patient.birthDate = birthDate "SetBirthDate"; immzc.caregiver as caregiver -> patient.contact as contact, contact.name as hname then NameToHumanName(caregiver, hname) "SetCaregiver"; immzc.phone as phone -> patient.telecom as telecom then { phone as content -> telecom.value = content, telecom.system = 'phone' "SetPhoneValue"; } "SetPhone"; immzc.administrativeArea as area -> patient.address as address then { area.coding first as coding -> address then { coding.code as content -> address.text = content "SetAddressToCode"; coding.display as content -> address.text = content "SetAddressToDisplay"; } "SetAddressText"; } "SetAdministrativeArea"; } group NameToHumanName(source name, target hname) { name.name as fullName -> hname.text = fullName "SetFullName"; // name.firstName as firstName -> hname.given = firstName "SetFirstName"; // name.familyName as familyName -> hname.family = familyName "SetFamilyName"; }
{
"resourceType" : "StructureMap",
"id" : "IMMZCLMToPatient",
"text" : {
"status" : "generated",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap IMMZCLMToPatient</b></p><a name=\"IMMZCLMToPatient\"> </a><a name=\"hcIMMZCLMToPatient\"> </a><a name=\"IMMZCLMToPatient-en-US\"> </a><pre class=\"fml\">\r\n<b>map</b><span style=\"color: navy\"> "</span>http://smart.who.int/immunizations-measles/StructureMap/IMMZCLMToPatient<span style=\"color: navy\">" = "</span>IMMZCLMToPatient<span style=\"color: navy\">"\r\n\r\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Immunization Client Registry - Transform Logical Model to Patient resources</span>\r\n\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"StructureDefinition-IMMZCRegisterClient.html\" title=\"IMMZ.C Register Client\">http://smart.who.int/immunizations-measles/StructureDefinition/IMMZCRegisterClient</a><span style=\"color: navy\">" </span><b>alias </b>IMMZC <b>as </b><b>source</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"http://hl7.org/fhir/R4/bundle.html\" title=\"Bundle\">http://hl7.org/fhir/StructureDefinition/Bundle</a><span style=\"color: navy\">" </span><b>alias </b>Bundle <b>as </b><b>target</b>\r\n<b>uses</b><span style=\"color: navy\"> "</span><a href=\"http://hl7.org/fhir/R4/patient.html\" title=\"Patient\">http://hl7.org/fhir/StructureDefinition/Patient</a><span style=\"color: navy\">" </span><b>alias </b>Patient <b>as </b><b>target</b>\r\n\r\n<b>group </b>IMMZCToPatient<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">immzc</span><span style=\"color: navy\"> : </span>IMMZC, <b>target</b> <span style=\"color: maroon\">patient</span><span style=\"color: navy\"> : </span>Patient<span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> immzc.uniqueId<b> as </b><span style=\"color: maroon\">id</span><span style=\"color: navy\"><b> -> </b></span>patient.identifier<b> as </b><span style=\"color: maroon\">identifier</span><b> then</b><span style=\"color: navy\"> {\r\n</span> id<span style=\"color: navy\"><b> -> </b></span>identifier.value = <span style=\"color: maroon\">id</span> <i>"SetIdentifierValue"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetIdentifier"</i><span style=\"color: navy\">;</span>\r\n immzc<span style=\"color: navy\"><b> -> </b></span>patient.name<b> as </b><span style=\"color: maroon\">pname</span><b> then </b>NameToHumanName<span style=\"color: navy\">(</span><span style=\"color: maroon\">immzc</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">pname</span><span style=\"color: navy\">)</span> <i>"SetName"</i><span style=\"color: navy\">;</span>\r\n immzc.sex<b> as </b><span style=\"color: maroon\">sex</span><span style=\"color: navy\"><b> -> </b></span>patient.gender = <b>translate</b><span style=\"color: navy\">(</span><span style=\"color: maroon\">sex</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'http://smart.who.int/immunizations-measles/ConceptMap/IMMZCSexToAdministrativeGender'</span><span style=\"color: navy\">, </span><span style=\"color: blue\">'code'</span><span style=\"color: navy\">)</span> <i>"SetGender"</i><span style=\"color: navy\">;</span>\r\n immzc.birthDate<b> as </b><span style=\"color: maroon\">birthDate</span><span style=\"color: navy\"><b> -> </b></span>patient.birthDate = <span style=\"color: maroon\">birthDate</span> <i>"SetBirthDate"</i><span style=\"color: navy\">;</span>\r\n immzc.caregiver<b> as </b><span style=\"color: maroon\">caregiver</span><span style=\"color: navy\"><b> -> </b></span> patient.contact<b> as </b><span style=\"color: maroon\">contact</span><span style=\"color: navy\">, </span> contact.name<b> as </b><span style=\"color: maroon\">hname</span><b> then </b>NameToHumanName<span style=\"color: navy\">(</span><span style=\"color: maroon\">caregiver</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">hname</span><span style=\"color: navy\">)</span> <i>"SetCaregiver"</i><span style=\"color: navy\">;</span>\r\n immzc.phone<b> as </b><span style=\"color: maroon\">phone</span><span style=\"color: navy\"><b> -> </b></span>patient.telecom<b> as </b><span style=\"color: maroon\">telecom</span><b> then</b><span style=\"color: navy\"> {\r\n</span> phone<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span> telecom.value = <span style=\"color: maroon\">content</span><span style=\"color: navy\">, </span> telecom.system = <span style=\"color: blue\">'phone'</span> <i>"SetPhoneValue"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetPhone"</i><span style=\"color: navy\">;</span>\r\n immzc.administrativeArea<b> as </b><span style=\"color: maroon\">area</span><span style=\"color: navy\"><b> -> </b></span>patient.address<b> as </b><span style=\"color: maroon\">address</span><b> then</b><span style=\"color: navy\"> {\r\n</span> area.coding first<b> as </b><span style=\"color: maroon\">coding</span><span style=\"color: navy\"><b> -> </b></span>address<b> then</b><span style=\"color: navy\"> {\r\n</span> coding.code<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>address.text = <span style=\"color: maroon\">content</span> <i>"SetAddressToCode"</i><span style=\"color: navy\">;</span>\r\n coding.display<b> as </b><span style=\"color: maroon\">content</span><span style=\"color: navy\"><b> -> </b></span>address.text = <span style=\"color: maroon\">content</span> <i>"SetAddressToDisplay"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetAddressText"</i><span style=\"color: navy\">;</span>\r\n <span style=\"color: navy\">}</span> <i>"SetAdministrativeArea"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span><b>group </b>NameToHumanName<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">name</span>, <b>target</b> <span style=\"color: maroon\">hname</span><span style=\"color: navy\">)</span><span style=\"color: navy\"> {\r\n</span> name.name<b> as </b><span style=\"color: maroon\">fullName</span><span style=\"color: navy\"><b> -> </b></span>hname.text = <span style=\"color: maroon\">fullName</span> <i>"SetFullName"</i><span style=\"color: navy\">;</span>\r\n<span style=\"color: #b36b00\" title=\"This element was not defined prior to R5\">// name.firstName as firstName -> hname.given = firstName "SetFirstName";</span>\r\n<span style=\"color: #b36b00\" title=\"This element was not defined prior to R5\">// name.familyName as familyName -> hname.family = familyName "SetFamilyName";</span>\r\n<span style=\"color: navy\">}\r\n\r\n</span></pre></div>"
},
"url" : "http://smart.who.int/immunizations-measles/StructureMap/IMMZCLMToPatient",
"version" : "0.1.0",
"name" : "IMMZCLMToPatient",
"status" : "draft",
"date" : "2024-09-21T14:59:40+00:00",
"publisher" : "WHO",
"contact" : [
{
"name" : "WHO",
"telecom" : [
{
"system" : "url",
"value" : "http://who.int"
}
]
}
],
"description" : "Immunization Client Registry - Transform Logical Model to Patient resources",
"structure" : [
{
"url" : "http://smart.who.int/immunizations-measles/StructureDefinition/IMMZCRegisterClient",
"mode" : "source",
"alias" : "IMMZC"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Bundle",
"mode" : "target",
"alias" : "Bundle"
},
{
"url" : "http://hl7.org/fhir/StructureDefinition/Patient",
"mode" : "target",
"alias" : "Patient"
}
],
"group" : [
{
"name" : "IMMZCToPatient",
"typeMode" : "none",
"input" : [
{
"name" : "immzc",
"type" : "IMMZC",
"mode" : "source"
},
{
"name" : "patient",
"type" : "Patient",
"mode" : "target"
}
],
"rule" : [
{
"name" : "SetIdentifier",
"source" : [
{
"context" : "immzc",
"element" : "uniqueId",
"variable" : "id"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "identifier",
"variable" : "identifier"
}
],
"rule" : [
{
"name" : "SetIdentifierValue",
"source" : [
{
"context" : "id"
}
],
"target" : [
{
"context" : "identifier",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "id"
}
]
}
]
}
]
},
{
"name" : "SetName",
"source" : [
{
"context" : "immzc"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "name",
"variable" : "pname"
}
],
"dependent" : [
{
"name" : "NameToHumanName",
"variable" : [
"immzc",
"pname"
]
}
]
},
{
"name" : "SetGender",
"source" : [
{
"context" : "immzc",
"element" : "sex",
"variable" : "sex"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "gender",
"transform" : "translate",
"parameter" : [
{
"valueId" : "sex"
},
{
"valueString" : "http://smart.who.int/immunizations-measles/ConceptMap/IMMZCSexToAdministrativeGender"
},
{
"valueString" : "code"
}
]
}
]
},
{
"name" : "SetBirthDate",
"source" : [
{
"context" : "immzc",
"element" : "birthDate",
"variable" : "birthDate"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "birthDate",
"transform" : "copy",
"parameter" : [
{
"valueId" : "birthDate"
}
]
}
]
},
{
"name" : "SetCaregiver",
"source" : [
{
"context" : "immzc",
"element" : "caregiver",
"variable" : "caregiver"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "contact",
"variable" : "contact"
},
{
"context" : "contact",
"contextType" : "variable",
"element" : "name",
"variable" : "hname"
}
],
"dependent" : [
{
"name" : "NameToHumanName",
"variable" : [
"caregiver",
"hname"
]
}
]
},
{
"name" : "SetPhone",
"source" : [
{
"context" : "immzc",
"element" : "phone",
"variable" : "phone"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "telecom",
"variable" : "telecom"
}
],
"rule" : [
{
"name" : "SetPhoneValue",
"source" : [
{
"context" : "phone",
"variable" : "content"
}
],
"target" : [
{
"context" : "telecom",
"contextType" : "variable",
"element" : "value",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
},
{
"context" : "telecom",
"contextType" : "variable",
"element" : "system",
"transform" : "copy",
"parameter" : [
{
"valueString" : "phone"
}
]
}
]
}
]
},
{
"name" : "SetAdministrativeArea",
"source" : [
{
"context" : "immzc",
"element" : "administrativeArea",
"variable" : "area"
}
],
"target" : [
{
"context" : "patient",
"contextType" : "variable",
"element" : "address",
"variable" : "address"
}
],
"rule" : [
{
"name" : "SetAddressText",
"source" : [
{
"context" : "area",
"element" : "coding",
"listMode" : "first",
"variable" : "coding"
}
],
"target" : [
{
"context" : "address",
"contextType" : "variable"
}
],
"rule" : [
{
"name" : "SetAddressToCode",
"source" : [
{
"context" : "coding",
"element" : "code",
"variable" : "content"
}
],
"target" : [
{
"context" : "address",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
},
{
"name" : "SetAddressToDisplay",
"source" : [
{
"context" : "coding",
"element" : "display",
"variable" : "content"
}
],
"target" : [
{
"context" : "address",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "content"
}
]
}
]
}
]
}
]
}
]
},
{
"name" : "NameToHumanName",
"typeMode" : "none",
"input" : [
{
"name" : "name",
"mode" : "source"
},
{
"name" : "hname",
"mode" : "target"
}
],
"rule" : [
{
"name" : "SetFullName",
"source" : [
{
"context" : "name",
"element" : "name",
"variable" : "fullName"
}
],
"target" : [
{
"context" : "hname",
"contextType" : "variable",
"element" : "text",
"transform" : "copy",
"parameter" : [
{
"valueId" : "fullName"
}
]
}
]
}
]
}
]
}
XIG built as of ??metadata-date??. Found ??metadata-resources?? resources in ??metadata-packages?? packages.